/*!
 * ---------------------------------------------------------------------
 *
 * GLPI - Gestionnaire Libre de Parc Informatique
 *
 * http://glpi-project.org
 *
 * @copyright 2015-2025 Teclib' and contributors.
 * @copyright 2003-2014 by the INDEPNET Development Team.
 * @licence   https://www.gnu.org/licenses/gpl-3.0.html
 *
 * ---------------------------------------------------------------------
 *
 * LICENSE
 *
 * This file is part of GLPI.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 *
 * ---------------------------------------------------------------------
 */

.asset,
.navigationheader {
    .card-header {
        background-color: var(--glpi-form-header-bg);
        color: var(--glpi-form-header-fg);
        border-color: var(--glpi-form-header-border-color);

        &:not(.main-header) {
            border-top: 1px solid var(--glpi-form-header-border-color);
        }

        .badge {
            @include tabler-badge-fix;

            &.entity-name {
                background-color: var(--glpi-form-header-bg);
                color: var(--glpi-form-header-fg);
            }
        }

        .badge .ribbon {
            left: 0.5rem;
        }

        // remove margin-left is small screen
        @include media-breakpoint-down(sm) {
            .badge {
                margin-left: 0 !important;
            }
        }
    }

    &.asset-deleted {
        .card-header {
            background-color: var(--glpi-form-header-danger-bg);
            color: var(--glpi-form-header-danger-fg);
            border-color: var(--glpi-form-header-border-danger-color);

            .badge.entity-name {
                background-color: var(--glpi-form-header-danger-bg);
                color: var(--glpi-form-header-danger-fg);
            }
        }
    }

    .asset-pictures {
        max-height: 40em;
        overflow-y: auto;
    }
}

#page > .asset {
    margin-top: 15px; // Fix top of form when embedded in iframe (Usually positioned properly because of .tab-content)
}

.navigationheader {
    &.asset-deleted {
        .main-header {
            .status {
                background-color: var(--glpi-form-header-danger-bg);
                color: var(--glpi-form-header-danger-fg);
                border-color: var(--glpi-form-header-border-danger-color);
            }
        }
    }

    &:not(.asset-deleted) {
        #header-is-deleted {
            display: none;
        }
    }

    .pagination-left {
        order: 1;
        text-align: left;
        display: flex;
    }

    .pagination-right {
        order: 3;
        text-align: right;
        display: flex;
    }

    .main-header {
        padding-top: 0;
        padding-bottom: 0;
        order: 2;

        .ribbon {
            position: relative;
            left: -0.25rem;
        }
    }

    .card-header {
        background-color: transparent !important;
        border-color: transparent !important;
    }
}

@media (max-width: 1200px) {
    .navigationheader {
        flex-wrap: wrap;

        .pagination-left {
            order: 1;
            width: 50%;
            place-content: start;
        }

        .pagination-right {
            order: 2;
            width: 50%;
            place-content: end;
        }

        .main-header {
            width: 100%;
            order: 3;
            margin-top: 0 !important;
            padding-left: 0 !important;
            padding-right: 0 !important;
        }
    }
}
